<html xmlns:th="http://www.thymeleaf.org">

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ocr</title>
    <script src="https://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
</head>
<body>
<!--拼接字符串使用双|包括-->
<!--<h1 th:text="|Hello ${name}|"></h1>-->
<!--&lt;!&ndash;遍历->-->
<!--<ul th:each="str:${strList}">-->
<!--  <li th:text="${str}"></li>-->
<!--</ul>-->
<!--&lt;!&ndash;判断&ndash;&gt;-->
<!--<div th:if="${show}">可见</div>-->
<!--<div>多人运动 </div>-->

<!--<div shiro:hasPermission="user:add">显示否</div>-->

<form action="/getImageWord" enctype="multipart/form-data" method="post">
    识别的图片文件<input type="file" name="file" accept="image/*" >
<!--    <input type="submit">-->
    <input type="submit" value="确认上传" >
</form>

<div>

</div>
<script>
    $("#subm").click(function(){
        var formData = new FormData();
        formData.append("appFile", document.getElementById("appFile").files[0]);
        // alert("8888888888888888888888888");
        $.ajax({
            url: '/getImageWord',
            type: "POST",
            data: formData,
            dataType: "json",
            contentType: false,
            processData: false,
            success: function (data) {
                alert("上传成功");
                $("#versionCode").val(data.versionCode);
                $("#appVersion").val(data.appVersion);
                $("#appPackageName").val(data.appPackageName);
            },
            error: function () {
                alert("上传失败！");
            }
        });
    });
</script>
</body>
</html>